package com.googlecode.grima.domain;

import java.util.ArrayList;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.activiti.engine.form.FormProperty;
import org.activiti.engine.impl.persistence.entity.TaskEntity;

public class Task {
	
	private String id;
	private List<FormProperty> formProperties;
	private org.activiti.engine.task.Task activitiTask = new TaskEntity();
	private Map<String, String> form = new HashMap<String, String>();
	private String action;
	private String assignee;
	private String assigneeName;
	
	public String getId() {
		return this.id;
	}
	
	public void setId(String id) {
		this.id = id;
	}
	
	public String getName() {
		return activitiTask.getName();
	}

	public String getDescription() {
		return activitiTask.getDescription();
	}
	
	public Date getCreateTime() {
		return activitiTask.getCreateTime();
	}
	
	public int getPriority() {
		return activitiTask.getPriority();
	}

	public void setPriority(int priority) {
		activitiTask.setPriority(priority);
	}

	public String getOwner() {
		return activitiTask.getOwner();
	}

	public void setOwner(String owner) {
		activitiTask.setOwner(owner);
	}

	public String getAssignee() {
		return assignee;
	}

	public void setAssignee(String assignee) {
		this.assignee = assignee;
	}

	public Date getDueDate() {
		return activitiTask.getDueDate();
	}

	public void setDueDate(Date dueDate) {
		activitiTask.setDueDate(dueDate);
	}
	
	public List<FormProperty> getFormProperties() {
		if (this.formProperties == null) {
			this.formProperties = new ArrayList<FormProperty>();
		}
		return formProperties;
	}

	public void setFormProperties(List<FormProperty> formProperties) {
		this.formProperties = formProperties;
	}

	public Map<String, String> getForm() {
		if (form == null){
			form = new HashMap<String, String>();
		}
		return form;
	}

	public void setForm(Map<String, String> form) {
		this.form = form;
	}

	public org.activiti.engine.task.Task getActivitiTask() {
		return activitiTask;
	}

	public void setActivitiTask(org.activiti.engine.task.Task activitiTask) {
		this.activitiTask = activitiTask;
	}

	public String getAction() {
		return action;
	}

	public void setAction(String action) {
		this.action = action;
	}

	public String getAssigneeName() {
		return assigneeName;
	}

	public void setAssigneeName(String assigneeName) {
		this.assigneeName = assigneeName;
	}
	
}
